import React, { Component } from 'react'
import store from "../store"
import  {addNum} from  "../action/numAction"

export default class A2 extends Component {
    render() {
        return (
            <div>A2
                <h2>使用全局的数据为{store.getState().numInfo.num}</h2>
                <button onClick={() => {
                    store.dispatch(addNum(10))
                    this.forceUpdate();
                }}>修改</button>
            </div>
        )
    }
}
